#ifndef STOCKINDIALOG_H
#define STOCKINDIALOG_H
#include <QCloseEvent>
#include <QDialog>
#include <QStandardItemModel>
namespace Ui {
class StockInDialog;
}

class StockInDialog : public QDialog
{
    Q_OBJECT

public:
    explicit StockInDialog(QWidget *parent = nullptr);
    ~StockInDialog();
signals:
    //自定义信号,通知主窗口对话框已经关闭
    void stockInDialogClosed();
private slots:
    void on_buttonBox_accepted();

    void on_buttonBox_rejected();
    //当验收单编号改变时
    void onReportSelected(int index);
    //提交入库单
    void onSubmit();

private:
    Ui::StockInDialog *ui;
    QStandardItemModel *model;
    //重写关闭事件
    void closeEvent(QCloseEvent *event);
    //初始化数据
    void initData();
    //清空验收单详情和产品表格
    void clearInfo();
};

#endif // STOCKINDIALOG_H
